package com.github.data_manage

import com.github.data_manage.job.MeetingStatisticsJob
import com.github.data_manage.util.DateTimeUtils.Companion.atEndOfDay
import com.github.data_manage.util.DateTimeUtils.Companion.atStartOfDay
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import java.time.LocalDateTime

/**
 *
 * @author chenhainan
 * @since 2025/9/29
 */
@SpringBootTest(classes = [DataManageApplication::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class MeetingStatisticsJobTest {

    @Autowired
    lateinit var meetingStatisticsJob: MeetingStatisticsJob

    @Test
    fun meetingStatisticsJobTest() {
        val now = LocalDateTime.now()
        val startTime = now.minusDays(1).atStartOfDay()
        val endTime = now.minusDays(1).atEndOfDay()
        meetingStatisticsJob.statisticsFundMeetings(startTime, endTime, "日报")
    }
}